//
//  ViewController.m
//  UILabelButtonAndUIImageViewButton
//
//  Created by mafeng on 16/7/18.
//  Copyright © 2016年 mafeng. All rights reserved.
//

#import "ViewController.h"
#import "UILabelButton.h"
#import "UIImageViewButton.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    UILabelButton *button = [[UILabelButton alloc] initWithFrame:CGRectMake(100, 100, 100, 40)];
    [self.view addSubview:button];
    button.backgroundColor = [UIColor yellowColor];
    [button addTarget:self action:@selector(action:)];
    
    UIImageViewButton *imageView = [[UIImageViewButton alloc] initWithFrame:CGRectMake(100, 200, 100, 40)];
    [self.view addSubview:imageView];
    [imageView addTarget:self action:@selector(action:)];
    imageView.backgroundColor = [UIColor blueColor];
}
- (void)action:(UIButton *)button {
    NSLog(@"biedianle");
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
